import DatabaseUtils from "../utils/db-utils";

class EmailDao {

    /**
     * 保存发送的邮件
     * @param userId
     * @param to
     * @param subject
     * @param html
     * @param sendResult
     */
    static createEmailDetail = async (userId: string, to: string, subject: string, html: string, sendResult: string) => {
        const sql = `insert into t_email(user_id, \`to\`, subject, html, send_result) values (?, ?, ?, ?, ?)`;
        const params = [userId, to, subject, html, sendResult];
        return await DatabaseUtils.execSql(sql, params);
    }
}

export default EmailDao;